﻿using System;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml.Serialization;

namespace FusionAnimationEditior
{
    public class Frames
    {

        [XmlElement( "SourceRect" )]
        public Rectangle SourceRect;
        [XmlElement("CollisionRect")]
        public Rectangle CollisionRect;
        [XmlElement("ActiveRect")]
        public Rectangle ActiveRect;
        [XmlElement("AnchorPoint")]
        public  Point anchorPoint;
        [XmlElement("Trigger")]
        public string trigger;
        [XmlElement("duration")]
        public float duration;
        







    }


    public class Animation
    {

        int imageID;



        private string FilePath;



        List<Frames> frames;

        int currFrame;

        [XmlElement( "frame" )]
        public int CurrFrame
        {
            get { return currFrame; }
            set { currFrame = value; }
        }


        [System.Xml.Serialization.XmlArrayItemAttribute( ElementName = "ListofFrames", IsNullable = false)]
        public List<Frames> Frames
        {
            get { return frames; }
            set { frames = value; }
        }

        [XmlElement("filePath")]
        public string FilePath1
        {
            get { return FilePath; }
            set { FilePath = value; }
        }

        [XmlElement("id" )]
        public int ImageID
        {
            get { return imageID; }
            set { imageID = value; }
        }


    }

}
